package server;

/**
 * @author zyy
 * @date 2020/12/29 上午9:26
 * @description
 */
public abstract class HttpServlet implements Servlet{
    public abstract void doGet(Request request,Response response);

    public abstract void doPost(Request request,Response response);

    @Override
    public void service(Request request, Response response) throws Exception {
        if (request.getMethod().equalsIgnoreCase("GET")){
            doGet(request,response);
        }else {
            doPost(request,response);
        }
    }
}
